package org.ysu.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.ysu.entity.Family;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 * 贫困户表 Mapper 接口
 * </p>
 *
 * @author LiuJunDa
 * @since 2024-08-16
 */
public interface FamilyMapper extends BaseMapper<Family> {
    List<Family> selectFamilyWithHead(Page<Family> page);
    Integer countFamiliesByRegionId(Long rId);
    Family getByIdWithHead(Long id);
    List<Family> selectFamilyWithHeadAndRegion(Page<Family> page, @Param("ew")QueryWrapper<Family> wrapper);
}
